package com.ruoyi.hr.accumulationFund.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hr.accumulationFund.mapper.HrAccumulationFundMapper;
import com.ruoyi.hr.accumulationFund.domain.HrAccumulationFund;
import com.ruoyi.hr.accumulationFund.service.IHrAccumulationFundService;
import com.ruoyi.common.core.text.Convert;

/**
 * 公积金Service业务层处理
 * 
 * @author xzshan
 * @date 2020-07-19
 */
@Service
public class HrAccumulationFundServiceImpl implements IHrAccumulationFundService 
{
    @Autowired
    private HrAccumulationFundMapper hrAccumulationFundMapper;

    /**
     * 查询公积金
     * 
     * @param id 公积金ID
     * @return 公积金
     */
    @Override
    public HrAccumulationFund selectHrAccumulationFundById(Long id)
    {
        return hrAccumulationFundMapper.selectHrAccumulationFundById(id);
    }

    /**
     * 查询公积金列表
     * 
     * @param hrAccumulationFund 公积金
     * @return 公积金
     */
    @Override
    public List<HrAccumulationFund> selectHrAccumulationFundList(HrAccumulationFund hrAccumulationFund)
    {
        return hrAccumulationFundMapper.selectHrAccumulationFundList(hrAccumulationFund);
    }

    /**
     * 新增公积金
     * 
     * @param hrAccumulationFund 公积金
     * @return 结果
     */
    @Override
    public int insertHrAccumulationFund(HrAccumulationFund hrAccumulationFund)
    {
        return hrAccumulationFundMapper.insertHrAccumulationFund(hrAccumulationFund);
    }

    /**
     * 修改公积金
     * 
     * @param hrAccumulationFund 公积金
     * @return 结果
     */
    @Override
    public int updateHrAccumulationFund(HrAccumulationFund hrAccumulationFund)
    {
        return hrAccumulationFundMapper.updateHrAccumulationFund(hrAccumulationFund);
    }

    /**
     * 删除公积金对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHrAccumulationFundByIds(String ids)
    {
        return hrAccumulationFundMapper.deleteHrAccumulationFundByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除公积金信息
     * 
     * @param id 公积金ID
     * @return 结果
     */
    @Override
    public int deleteHrAccumulationFundById(Long id)
    {
        return hrAccumulationFundMapper.deleteHrAccumulationFundById(id);
    }
}
